Skip to content

Remove autoscroll on product carousel#15286

Merged
oliverabrahams merged 1 commit intomainfrom
oa/remove-autoscroll-from-carousel
Feb 3, 2026
Merged

Remove autoscroll on product carousel#15286
oliverabrahams merged 1 commit intomainfrom
oa/remove-autoscroll-from-carousel

Conversation

@oliverabrahams
Copy link
Contributor

@oliverabrahams oliverabrahams commented Feb 3, 2026

What does this change?

This removes a function which causes focus events to scroll the carousel to show card clicked. Described here

If a card gains focus (e.g. by tabbing through the elements of the page) then the browser
will scroll the container to the focused card if it is NOT visible. If it is partially visible
such as in the case with our carousel, then the browser will not bring the card in to view.

Copied from the scrollable carousel. It was causing issues with the clicking on the buttons and the read more.

Why?

The focus scroll was messing around with the clicks on the cards. It is an optimisation for half showing cards, This is clashing with the read more clicks and the clicks to retailers. Making a click on a button scroll the carousel rather than go to the retailer. The browser does this anyway for cards off screen it is purely for partially visible cards.

For this A/B/C test it is an optimisation which is causing more issues than it is solving. Would be worth revisiting for when the carousel makes it to production

Before

Screen.Recording.2026-02-03.at.14.06.56.mov

After

Screen.Recording.2026-02-03.at.14.05.44.mov

…s. The browser does this anyway for cards off screen. For this A/B/C test it is an optimisation we dont need.
@github-actions
Copy link

github-actions bot commented Feb 3, 2026

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@oliverabrahams oliverabrahams changed the title Remove autoscroll on Remove autoscroll on product carousel Feb 3, 2026
@oliverabrahams oliverabrahams added fix Departmental tracking: fix run_chromatic Runs chromatic when label is applied labels Feb 3, 2026
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Feb 3, 2026
Copy link
Contributor

@emma-imber emma-imber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine for the test, and we can revisit later on like you say!

@oliverabrahams oliverabrahams merged commit 1ec57fc into main Feb 3, 2026
32 of 34 checks passed
@oliverabrahams oliverabrahams deleted the oa/remove-autoscroll-from-carousel branch February 3, 2026 14:09
@gu-prout
Copy link

gu-prout bot commented Feb 3, 2026

Seen on PROD (merged by @oliverabrahams 7 minutes and 53 seconds ago) Please check your changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Departmental tracking: fix Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants